class Student:
    def __init__(self, student_id, name, age):
        self.student_id = student_id
        self.name = name
        self.age = age

    def __str__(self):
        return f"学号：{self.student_id}，姓名：{self.name}，年龄：{self.age}"


class StudentManager:
    def __init__(self):
        self.students = []

    def add_student(self, student):
        self.students.append(student)

    def display_all_students(self):
        if not self.students:
            print("当前没有学生信息。")
            return
        print("当前系统中的学生信息：")
        for student in self.students:
            print(student)


def display_menu():
    print("\n学生信息管理系统")
    print("1. 添加学生")
    print("2. 查询学生")
    print("3. 删除学生")
    print("4. 显示所有学生")
    print("5. 退出")
    choice = input("请输入操作编号：")
    return choice.strip()


def main():
    manager = StudentManager()
    while True:
        choice = display_menu()
        if choice == '1':
            info = input("请输入学号、姓名、年龄（用空格分隔）：").strip()
            parts = info.split()
            if len(parts) != 3:
                print("输入格式不正确！")
                continue
            student_id, name, age = parts
            try:
                age = int(age)
            except ValueError:
                print("年龄必须为整数！")
                continue
            student = Student(student_id, name, age)
            manager.add_student(student)
            print("添加成功！")
        elif choice == '2':
            keyword = input("请输入学号或姓名：").strip()
            # 查询逻辑（需补充）
        elif choice == '3':
            # 删除逻辑（需补充）
            pass
        elif choice == '4':
            manager.display_all_students()
        elif choice == '5':
            print("退出系统。")
            break
        else:
            print("输入无效，请重新输入。")


main()